<!DOCTYPE html>
<html  xmlns="http://www.w3.org/1999/xhtml"
       xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div th:fragment="addressFragment(address)">
  <p th:if="${address == 'address1'}">这是地址1</p>
  <p th:if="${address == 'address2'}">这是地址2</p>
  <p th:if="${address == 'address3'}">这是地址3</p>
</div>

</body>
</html>